export default function s(brr, _arr, index, name) {
    if (!index) index = 0
    const key = brr.findIndex((v) => typeof v === "object" && !Array.isArray(v));
    console.log(brr)
    console.log(_arr)

    console.log(index)
    console.log(name)
    if (typeof _arr === 'string') {
        return _arr
    }
    const arr = JSON.parse(JSON.stringify(_arr))
    console.log(Array.isArray(arr[index]))
    if (key !== -1) {
        if (brr[key].type) {
            if (Array.isArray(arr[index])) {
                arr[index].push('a1')
            } else {
                arr[index] = [arr[index], 'a1']
            }
        } else {
            arr.push("a1");
        }
    } else {
        return brr
    }
    return arr
}